package ModelLayer;

/**
 * 
 * @Author (Alexander Hvidberg, Dennis Kirkebak & Thomas Kulmbach)
 * @Team (Group 1)
 * @Version (08/11/13)
 * 
 */
public class Person
{
    // instance variables - replace the example below with your own
    private int id;
    private String name;
    private String address;
    private String postalCode;
    private String city;
    private String phoneNumber;

    /**
     * Constructor for objects of class Person
     */
    public Person(int id, String name, String address, String postalCode, String city, String phoneNumber)
    {
        this.id = id;
        this.name = name;
        this.address = address;
        this.postalCode = postalCode;
        this.city = city;
        this.phoneNumber = phoneNumber;
    }

    /**
     * Prints all the details on the person
     */
    public String printDetails(){
        return              ("\n ID: " + id
                            + "\n Name:           " + name
                            + "\n Address:        " + address
                            + "\n Postal Code:    " + postalCode
                            + "\n City:           " + city
                            + "\n Phone Number:   " + phoneNumber
                            + "\n \n");
    }
    
    /**
     * Prints a short info about a person
     */
    public String printShortDetails()
    {
        return ("ID: "+id+"    Name: "+name+"   Phonenumber: "+phoneNumber+ " \n");
    }
    
    /**
     * Updates the information in the person
     * @param String name - The name of the person
     * @param String address - The persons address
     * @param String postalCode - The persons postal code
     * @param String city - The city the person lives in
     * @param String phoneNumber - The persons phone number
     */
    public void updatePerson(String name, String address, String postalCode, String city, String phoneNumber){
        this.name = name;
        this.address = address;
        this.postalCode = postalCode;
        this.city = city;
        this.phoneNumber = phoneNumber;
    }
  //Set & Get methods for the entire class
  
    /**
     * Sets the id of the person
     * @param int id - The wanted id
     */
    public void setId(int id){
      this.id = id;
    }
    /**
     * Sets the name of the person
     * @param String name - The wanted name
     */
    public void setName(String name){
      this.name = name;
    }
    /**
     * Sets the address of the person
     * @param String address - The wanted address
     */
    public void setAddress(String address){
      this.address = address;
    }
    /**
     * Sets the persons postal code
     * @param String postalCode - The wanted postalcode
     */
    public void setPostalCode(String postalCode){
        this.postalCode = postalCode;
    }
    /**
     * Sets the persons city
     * @param String city - The wanted city
     */
    public void setCity(String city){
        this.city = city;
    }
     /**
     * Sets the persons phone number
     * @param String phoneNumber - The wanted phone number
     */
    public void setPhoneNumber(String phoneNumber){
        this.phoneNumber = phoneNumber;
    }
    
    /**
     * Returns the persons id
     * @return int id - The persons ID
     */
    public int getId(){
        return id;
    }
    /**
     * Returns the persons name
     * @return String name - The persons name
     */
    public String getName(){
        return name;
    }
    /**
     * Returns the persons address
     * @return String address - The persons address
     */
    public String getAddress(){
        return address;
    }
    /**
     * Returns the persons postal code
     * @return String postalCode - The persons postal code
     */
    public String getPostalCode(){
        return postalCode;
    }
    /**
     * Returns the city the person lives in
     * @return String city - The city the person lives in
     */
    public String getCity(){
        return city;
    }
    /**
     * Returns the persons phone number
     * @return String phoneNumber - The persons phone number
     */
    public String getPhoneNumber(){
        return phoneNumber;
    }
    
}
